/**
*  \file control_fan.h
*
*  \brief
*
*  \author Michael J. Hohmann  michael.hohmann@linde-mh.de
*
*
*
*
*
*/
#ifndef CONTROL_FAN_H_INCLUDED
#define CONTROL_FAN_H_INCLUDED

/*================================================[ public includes  ]================================================*/
#include "../cfg/prj.h"

/*================================================[ public defines   ]================================================*/

/*================================================[ public datatypes ]================================================*/
/** Object definition.
* 
* The struct control_fan_obj defines the attribute of an object.
*/
struct control_fan_obj
{	
   BO current_state;   /**< */
   S16 const * p_temp_on;
   S16 const * p_temp_off;
};

/*================================================[ public variables ]================================================*/

/*================================================[ inline functions ]================================================*/

/*================================================[ public functions ]================================================*/

/**
*  Constructor.
*
*  Construct an object. 
*
*  \param me Object pointer. NULL will throw an assert.
*
*  \return RC_SUCCESS if successful.
*/
RC control_fan_construct( struct control_fan_obj *me,  S16 const * p_temp_on, S16 const * p_temp_off );

/** Fan control logic
**
*  \param me Object pointer. NULL will throw an assert.
*
*  \return TRUE if fan is on. FALSE if fan is off .
*/
BO control_fan( struct control_fan_obj *me, S16 temp );

/*====================================================================================================================*/

#endif

/***********************************************************************************************************************
*                             Copyright 2020 Linde Material Handling. All rights reserved.                             *
***********************************************************************************************************************/
